-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend optimization methods #37
Extend optimization methods #37
Conversation
PR brakes backwards compatibility because I have renamed the branchlength_optim! kwarg bl_optimizer to bl_modifer and the nni_optim! kwarg acc_rule to nni_selection_rule, (it is because of this the runtest.jl fails, it is a instance where we call bl_optimizer=BrentsMethodOpt() instead of bl_modifer = BrentsMethodOpt()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. I think we should break backwards-compat since this PR allows for more flexible behaviours of branchlength_optim!
and nni_optim!
. kwargs should probably be renamed for the sake of clarity.
See my more detailed comments and please update the tests so that they pass.
|
||
Returns a untangled copy of the a tree. Optionally, the flag `shallow_copy` can be used to obtained a copy of the tree with only the names and branchlengths. | ||
""" | ||
function copy_tree(root::FelNode, shallow_copy=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have any performance comparisons between deepcopy(tree)
and copy_tree(tree)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't benchmarked this. I can look into this. Do you have any specific benchmark in mind? Like the time etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use @benchmark
from BenchmarkTools.jl
to get time, allocs etc.
Added functionality to sample tree topologies with the metropolis_sample function, given a branch model and leaf node data.